<!DOCTYPE html>
<script src="../../resources/testharness.js"></script>
<script src="../../resources/testharnessreport.js"></script>
<p>Outdenting a sublist should remove one level.</p>
<div id="div" contentEditable="true"><ul><ul><li>foo</li></ul></ul></div>
<div id="log"></div>
<script>
test(function() {
    var div = document.getElementById('div');
    var selection = window.getSelection();

    selection.collapse(div, 0);
    document.execCommand('Outdent');

    assert_equals(div.innerHTML, '<ul><li>foo<br></li></ul>');
    assert_true(selection.isCollapsed);
    assert_equals(selection.anchorNode, div.querySelector('li').firstChild);
    assert_equals(selection.anchorOffset, 0);
});
</script>
